//
//  HomeSleepModel.swift
//  DaRings
//
//  Created by 尹琼 on 2022/10/28.
//

import UIKit
import MYModule

open class HomeSleepModel: HomeModel {
    
    public var date: String = ""
    
    public var hasData = false
    public var fallAsleep =  "--"
    public var wakeUp =  "--"
    public var hour: Int?
    public var minute: Int?
    public var targetHour = 0
    
    public var lineData: [SegmentLineChartModel] = []
    
    public var quantity = 0
    
    public var hourTitle: String {
        
        guard let hour = hour, let _ = minute else {
            return "--"
        }
 
        return String(format: "%02d", hour)
        
    }
    
    public var minuteTitle: String {
        
        guard let _ = hour, let minute = minute else {
            return "--"
        }
        return String(format: "%02d", minute)
        
    }
    
    
}
